package com.xuyiwei.mayi.main;

import com.xuyiwei.mayi.controller.UserController;
import com.xuyiwei.mayi.entity.UserEntity;
import com.xuyiwei.mayi.service.UserService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by xuyiwei on 2019/4/18.
 */
public class SpringTest {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(
                "applicationContext.xml");
        UserController userController = (UserController) applicationContext.getBean("userController");
        userController.add();
//
//        ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
//        UserService userService = (UserService) applicationContext.getBean("userService");
//        userService.add();
    }
}
